<?php
App::uses('AppController', 'Controller');
/**
 * Services Controller
 *
 * @property Service $Service
 * @property PaginatorComponent $Paginator
 * @property SessionComponent $Session
 */
class SalariesController extends AppController {

/**
 * Components
 *
 * @var array
 */
	public $components = array('Paginator', 'Session');
	/*
     public function beforeFilter() {
        $this->Security->unlockedActions = array('add');
        parent::beforeFilter();
		}
		*/
/**
 * index method
 *
 * @return void
 */
	public function index(){
		
	}
	public function edit($id = null) {	
		$salary = $this->Salary->find('first',array('conditions'=>array('Salary.id'=>$id)));
		$this->set(compact('salary'));
		$this->set('saved', false); //false by default - controls closure of overlay in which this is opened   
		if (!$this->Salary->exists($id)) {
			throw new NotFoundException(__('Không có bản ghi này'));
		}
		//$data = 
		//debug$this->request->data);
		/*
		if ($this->request->is(array('post', 'put'))) {		
			$this->Salary->id = $id; 
			if ($this->Salary->save($data)) {
				$this->set('saved', true);
			}
		}
		*/
	}


}
